package com.geor.gcr.idc;

import android.graphics.BitmapFactory;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import java.io.File;
import java.io.FileInputStream;

public class ImageActivity extends AppCompatActivity {

    ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_image);

        Bundle bundle = this.getIntent().getExtras();
        String filepath = bundle.getString("file.path");

        imageView = (ImageView) findViewById(R.id.imageView);

        try {
            imageView.setImageBitmap(BitmapFactory.decodeStream(new FileInputStream(new File(filepath))));
        } catch (Exception e) {
            e.printStackTrace();
        }

        TextView textView = (TextView) findViewById(R.id.textView);
        textView.setText(bundle.getString("银行卡号"));

    }
}
